{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n// TODO: https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/treeview/treeview-2/treeview-2a.html\n// Fully accessibility support\nimport * as React from 'react';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport warning from \"rc-util/es/warning\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport classNames from 'classnames';\nimport { TreeContext } from './contextTypes';\nimport { getDragChildrenKeys, parseCheckedKeys, conductExpandParent, calcSelectedKeys, calcDropPosition, arrAdd, arrDel, posToArr } from './util';\nimport { flattenTreeData, convertTreeToData, convertDataToEntities, warningWithoutKey, convertNodePropsToEventData, getTreeNodeProps, fillFieldNames } from './utils/treeUtil';\nimport NodeList, { MOTION_KEY, MotionEntity } from './NodeList';\nimport TreeNode from './TreeNode';\nimport { conductCheck } from './utils/conductUtil';\nimport DropIndicator from './DropIndicator';\nvar MAX_RETRY_TIMES = 10;\nvar Tree = /*#__PURE__*/function (_React$Component) {\n  _inherits(Tree, _React$Component);\n  var _super = _createSuper(Tree);\n  function Tree() {\n    var _this;\n    _classCallCheck(this, Tree);\n    for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n      _args[_key] = arguments[_key];\n    }\n    _this = _super.call.apply(_super, [this].concat(_args));\n    _this.destroyed = false;\n    _this.delayedDragEnterLogic = void 0;\n    _this.loadingRetryTimes = {};\n    _this.state = {\n      keyEntities: {},\n      indent: null,\n      selectedKeys: [],\n      checkedKeys: [],\n      halfCheckedKeys: [],\n      loadedKeys: [],\n      loadingKeys: [],\n      expandedKeys: [],\n      draggingNodeKey: null,\n      dragChildrenKeys: [],\n      // dropTargetKey is the key of abstract-drop-node\n      // the abstract-drop-node is the real drop node when drag and drop\n      // not the DOM drag over node\n      dropTargetKey: null,\n      dropPosition: null,\n      dropContainerKey: null,\n      dropLevelOffset: null,\n      dropTargetPos: null,\n      dropAllowed: true,\n      // the abstract-drag-over-node\n      // if mouse is on the bottom of top dom node or no the top of the bottom dom node\n      // abstract-drag-over-node is the top node\n      dragOverNodeKey: null,\n      treeData: [],\n      flattenNodes: [],\n      focused: false,\n      activeKey: null,\n      listChanging: false,\n      prevProps: null,\n      fieldNames: fillFieldNames()\n    };\n    _this.dragStartMousePosition = null;\n    _this.dragNode = void 0;\n    _this.currentMouseOverDroppableNodeKey = null;\n    _this.listRef = /*#__PURE__*/React.createRef();\n    _this.onNodeDragStart = function (event, node) {\n      var _this$state = _this.state,\n        expandedKeys = _this$state.expandedKeys,\n        keyEntities = _this$state.keyEntities;\n      var onDragStart = _this.props.onDragStart;\n      var eventKey = node.props.eventKey;\n      _this.dragNode = node;\n      _this.dragStartMousePosition = {\n        x: event.clientX,\n        y: event.clientY\n      };\n      var newExpandedKeys = arrDel(expandedKeys, eventKey);\n      _this.setState({\n        draggingNodeKey: eventKey,\n        dragChildrenKeys: getDragChildrenKeys(eventKey, keyEntities),\n        indent: _this.listRef.current.getIndentWidth()\n      });\n      _this.setExpandedKeys(newExpandedKeys);\n      window.addEventListener('dragend', _this.onWindowDragEnd);\n      onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n    };\n    _this.onNodeDragEnter = function (event, node) {\n      var _this$state2 = _this.state,\n        expandedKeys = _this$state2.expandedKeys,\n        keyEntities = _this$state2.keyEntities,\n        dragChildrenKeys = _this$state2.dragChildrenKeys,\n        flattenNodes = _this$state2.flattenNodes,\n        indent = _this$state2.indent;\n      var _this$props = _this.props,\n        onDragEnter = _this$props.onDragEnter,\n        onExpand = _this$props.onExpand,\n        allowDrop = _this$props.allowDrop,\n        direction = _this$props.direction;\n      var _node$props = node.props,\n        pos = _node$props.pos,\n        eventKey = _node$props.eventKey;\n      var _assertThisInitialize = _assertThisInitialized(_this),\n        dragNode = _assertThisInitialize.dragNode;\n      // record the key of node which is latest entered, used in dragleave event.\n      if (_this.currentMouseOverDroppableNodeKey !== eventKey) {\n        _this.currentMouseOverDroppableNodeKey = eventKey;\n      }\n      if (!dragNode) {\n        _this.resetDragState();\n        return;\n      }\n      var _calcDropPosition = calcDropPosition(event, dragNode, node, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),\n        dropPosition = _calcDropPosition.dropPosition,\n        dropLevelOffset = _calcDropPosition.dropLevelOffset,\n        dropTargetKey = _calcDropPosition.dropTargetKey,\n        dropContainerKey = _calcDropPosition.dropContainerKey,\n        dropTargetPos = _calcDropPosition.dropTargetPos,\n        dropAllowed = _calcDropPosition.dropAllowed,\n        dragOverNodeKey = _calcDropPosition.dragOverNodeKey;\n      if (\n      // don't allow drop inside its children\n      dragChildrenKeys.indexOf(dropTargetKey) !== -1 ||\n      // don't allow drop when drop is not allowed caculated by calcDropPosition\n      !dropAllowed) {\n        _this.resetDragState();\n        return;\n      }\n      // Side effect for delay drag\n      if (!_this.delayedDragEnterLogic) {\n        _this.delayedDragEnterLogic = {};\n      }\n      Object.keys(_this.delayedDragEnterLogic).forEach(function (key) {\n        clearTimeout(_this.delayedDragEnterLogic[key]);\n      });\n      if (dragNode.props.eventKey !== node.props.eventKey) {\n        // hoist expand logic here\n        // since if logic is on the bottom\n        // it will be blocked by abstract dragover node check\n        //   => if you dragenter from top, you mouse will still be consider as in the top node\n        event.persist();\n        _this.delayedDragEnterLogic[pos] = window.setTimeout(function () {\n          if (_this.state.draggingNodeKey === null) return;\n          var newExpandedKeys = _toConsumableArray(expandedKeys);\n          var entity = keyEntities[node.props.eventKey];\n          if (entity && (entity.children || []).length) {\n            newExpandedKeys = arrAdd(expandedKeys, node.props.eventKey);\n          }\n          if (!('expandedKeys' in _this.props)) {\n            _this.setExpandedKeys(newExpandedKeys);\n          }\n          onExpand === null || onExpand === void 0 ? void 0 : onExpand(newExpandedKeys, {\n            node: convertNodePropsToEventData(node.props),\n            expanded: true,\n            nativeEvent: event.nativeEvent\n          });\n        }, 800);\n      }\n      // Skip if drag node is self\n      if (dragNode.props.eventKey === dropTargetKey && dropLevelOffset === 0) {\n        _this.resetDragState();\n        return;\n      }\n      // Update drag over node and drag state\n      _this.setState({\n        dragOverNodeKey: dragOverNodeKey,\n        dropPosition: dropPosition,\n        dropLevelOffset: dropLevelOffset,\n        dropTargetKey: dropTargetKey,\n        dropContainerKey: dropContainerKey,\n        dropTargetPos: dropTargetPos,\n        dropAllowed: dropAllowed\n      });\n      onDragEnter === null || onDragEnter === void 0 ? void 0 : onDragEnter({\n        event: event,\n        node: convertNodePropsToEventData(node.props),\n        expandedKeys: expandedKeys\n      });\n    };\n    _this.onNodeDragOver = function (event, node) {\n      var _this$state3 = _this.state,\n        dragChildrenKeys = _this$state3.dragChildrenKeys,\n        flattenNodes = _this$state3.flattenNodes,\n        keyEntities = _this$state3.keyEntities,\n        expandedKeys = _this$state3.expandedKeys,\n        indent = _this$state3.indent;\n      var _this$props2 = _this.props,\n        onDragOver = _this$props2.onDragOver,\n        allowDrop = _this$props2.allowDrop,\n        direction = _this$props2.direction;\n      var _assertThisInitialize2 = _assertThisInitialized(_this),\n        dragNode = _assertThisInitialize2.dragNode;\n      if (!dragNode) {\n        return;\n      }\n      var _calcDropPosition2 = calcDropPosition(event, dragNode, node, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),\n        dropPosition = _calcDropPosition2.dropPosition,\n        dropLevelOffset = _calcDropPosition2.dropLevelOffset,\n        dropTargetKey = _calcDropPosition2.dropTargetKey,\n        dropContainerKey = _calcDropPosition2.dropContainerKey,\n        dropAllowed = _calcDropPosition2.dropAllowed,\n        dropTargetPos = _calcDropPosition2.dropTargetPos,\n        dragOverNodeKey = _calcDropPosition2.dragOverNodeKey;\n      if (dragChildrenKeys.indexOf(dropTargetKey) !== -1 || !dropAllowed) {\n        // don't allow drop inside its children\n        // don't allow drop when drop is not allowed caculated by calcDropPosition\n        return;\n      }\n      // Update drag position\n      if (dragNode.props.eventKey === dropTargetKey && dropLevelOffset === 0) {\n        if (!(_this.state.dropPosition === null && _this.state.dropLevelOffset === null && _this.state.dropTargetKey === null && _this.state.dropContainerKey === null && _this.state.dropTargetPos === null && _this.state.dropAllowed === false && _this.state.dragOverNodeKey === null)) {\n          _this.resetDragState();\n        }\n      } else if (!(dropPosition === _this.state.dropPosition && dropLevelOffset === _this.state.dropLevelOffset && dropTargetKey === _this.state.dropTargetKey && dropContainerKey === _this.state.dropContainerKey && dropTargetPos === _this.state.dropTargetPos && dropAllowed === _this.state.dropAllowed && dragOverNodeKey === _this.state.dragOverNodeKey)) {\n        _this.setState({\n          dropPosition: dropPosition,\n          dropLevelOffset: dropLevelOffset,\n          dropTargetKey: dropTargetKey,\n          dropContainerKey: dropContainerKey,\n          dropTargetPos: dropTargetPos,\n          dropAllowed: dropAllowed,\n          dragOverNodeKey: dragOverNodeKey\n        });\n      }\n      onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n    };\n    _this.onNodeDragLeave = function (event, node) {\n      // if it is outside the droppable area\n      // currentMouseOverDroppableNodeKey will be updated in dragenter event when into another droppable receiver.\n      if (_this.currentMouseOverDroppableNodeKey === node.props.eventKey && !event.currentTarget.contains(event.relatedTarget)) {\n        _this.resetDragState();\n        _this.currentMouseOverDroppableNodeKey = null;\n      }\n      var onDragLeave = _this.props.onDragLeave;\n      onDragLeave === null || onDragLeave === void 0 ? void 0 : onDragLeave({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n    };\n    _this.onWindowDragEnd = function (event) {\n      _this.onNodeDragEnd(event, null, true);\n      window.removeEventListener('dragend', _this.onWindowDragEnd);\n    };\n    _this.onNodeDragEnd = function (event, node) {\n      var onDragEnd = _this.props.onDragEnd;\n      _this.setState({\n        dragOverNodeKey: null\n      });\n      _this.cleanDragState();\n      onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n      _this.dragNode = null;\n      window.removeEventListener('dragend', _this.onWindowDragEnd);\n    };\n    _this.onNodeDrop = function (event, node) {\n      var _this$getActiveItem;\n      var outsideTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _this$state4 = _this.state,\n        dragChildrenKeys = _this$state4.dragChildrenKeys,\n        dropPosition = _this$state4.dropPosition,\n        dropTargetKey = _this$state4.dropTargetKey,\n        dropTargetPos = _this$state4.dropTargetPos,\n        dropAllowed = _this$state4.dropAllowed;\n      if (!dropAllowed) return;\n      var onDrop = _this.props.onDrop;\n      _this.setState({\n        dragOverNodeKey: null\n      });\n      _this.cleanDragState();\n      if (dropTargetKey === null) return;\n      var abstractDropNodeProps = _objectSpread(_objectSpread({}, getTreeNodeProps(dropTargetKey, _this.getTreeNodeRequiredProps())), {}, {\n        active: ((_this$getActiveItem = _this.getActiveItem()) === null || _this$getActiveItem === void 0 ? void 0 : _this$getActiveItem.key) === dropTargetKey,\n        data: _this.state.keyEntities[dropTargetKey].node\n      });\n      var dropToChild = dragChildrenKeys.indexOf(dropTargetKey) !== -1;\n      warning(!dropToChild, \"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.\");\n      var posArr = posToArr(dropTargetPos);\n      var dropResult = {\n        event: event,\n        node: convertNodePropsToEventData(abstractDropNodeProps),\n        dragNode: _this.dragNode ? convertNodePropsToEventData(_this.dragNode.props) : null,\n        dragNodesKeys: [_this.dragNode.props.eventKey].concat(dragChildrenKeys),\n        dropToGap: dropPosition !== 0,\n        dropPosition: dropPosition + Number(posArr[posArr.length - 1])\n      };\n      if (!outsideTree) {\n        onDrop === null || onDrop === void 0 ? void 0 : onDrop(dropResult);\n      }\n      _this.dragNode = null;\n    };\n    _this.cleanDragState = function () {\n      var draggingNodeKey = _this.state.draggingNodeKey;\n      if (draggingNodeKey !== null) {\n        _this.setState({\n          draggingNodeKey: null,\n          dropPosition: null,\n          dropContainerKey: null,\n          dropTargetKey: null,\n          dropLevelOffset: null,\n          dropAllowed: true,\n          dragOverNodeKey: null\n        });\n      }\n      _this.dragStartMousePosition = null;\n      _this.currentMouseOverDroppableNodeKey = null;\n    };\n    _this.triggerExpandActionExpand = function (e, treeNode) {\n      var _this$state5 = _this.state,\n        expandedKeys = _this$state5.expandedKeys,\n        flattenNodes = _this$state5.flattenNodes;\n      var expanded = treeNode.expanded,\n        key = treeNode.key,\n        isLeaf = treeNode.isLeaf;\n      if (isLeaf || e.shiftKey || e.metaKey || e.ctrlKey) {\n        return;\n      }\n      var node = flattenNodes.filter(function (nodeItem) {\n        return nodeItem.key === key;\n      })[0];\n      var eventNode = convertNodePropsToEventData(_objectSpread(_objectSpread({}, getTreeNodeProps(key, _this.getTreeNodeRequiredProps())), {}, {\n        data: node.data\n      }));\n      _this.setExpandedKeys(expanded ? arrDel(expandedKeys, key) : arrAdd(expandedKeys, key));\n      _this.onNodeExpand(e, eventNode);\n    };\n    _this.onNodeClick = function (e, treeNode) {\n      var _this$props3 = _this.props,\n        onClick = _this$props3.onClick,\n        expandAction = _this$props3.expandAction;\n      if (expandAction === 'click') {\n        _this.triggerExpandActionExpand(e, treeNode);\n      }\n      onClick === null || onClick === void 0 ? void 0 : onClick(e, treeNode);\n    };\n    _this.onNodeDoubleClick = function (e, treeNode) {\n      var _this$props4 = _this.props,\n        onDoubleClick = _this$props4.onDoubleClick,\n        expandAction = _this$props4.expandAction;\n      if (expandAction === 'doubleClick') {\n        _this.triggerExpandActionExpand(e, treeNode);\n      }\n      onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e, treeNode);\n    };\n    _this.onNodeSelect = function (e, treeNode) {\n      var selectedKeys = _this.state.selectedKeys;\n      var _this$state6 = _this.state,\n        keyEntities = _this$state6.keyEntities,\n        fieldNames = _this$state6.fieldNames;\n      var _this$props5 = _this.props,\n        onSelect = _this$props5.onSelect,\n        multiple = _this$props5.multiple;\n      var selected = treeNode.selected;\n      var key = treeNode[fieldNames.key];\n      var targetSelected = !selected;\n      // Update selected keys\n      if (!targetSelected) {\n        selectedKeys = arrDel(selectedKeys, key);\n      } else if (!multiple) {\n        selectedKeys = [key];\n      } else {\n        selectedKeys = arrAdd(selectedKeys, key);\n      }\n      // [Legacy] Not found related usage in doc or upper libs\n      var selectedNodes = selectedKeys.map(function (selectedKey) {\n        var entity = keyEntities[selectedKey];\n        if (!entity) return null;\n        return entity.node;\n      }).filter(function (node) {\n        return node;\n      });\n      _this.setUncontrolledState({\n        selectedKeys: selectedKeys\n      });\n      onSelect === null || onSelect === void 0 ? void 0 : onSelect(selectedKeys, {\n        event: 'select',\n        selected: targetSelected,\n        node: treeNode,\n        selectedNodes: selectedNodes,\n        nativeEvent: e.nativeEvent\n      });\n    };\n    _this.onNodeCheck = function (e, treeNode, checked) {\n      var _this$state7 = _this.state,\n        keyEntities = _this$state7.keyEntities,\n        oriCheckedKeys = _this$state7.checkedKeys,\n        oriHalfCheckedKeys = _this$state7.halfCheckedKeys;\n      var _this$props6 = _this.props,\n        checkStrictly = _this$props6.checkStrictly,\n        onCheck = _this$props6.onCheck;\n      var key = treeNode.key;\n      // Prepare trigger arguments\n      var checkedObj;\n      var eventObj = {\n        event: 'check',\n        node: treeNode,\n        checked: checked,\n        nativeEvent: e.nativeEvent\n      };\n      if (checkStrictly) {\n        var checkedKeys = checked ? arrAdd(oriCheckedKeys, key) : arrDel(oriCheckedKeys, key);\n        var halfCheckedKeys = arrDel(oriHalfCheckedKeys, key);\n        checkedObj = {\n          checked: checkedKeys,\n          halfChecked: halfCheckedKeys\n        };\n        eventObj.checkedNodes = checkedKeys.map(function (checkedKey) {\n          return keyEntities[checkedKey];\n        }).filter(function (entity) {\n          return entity;\n        }).map(function (entity) {\n          return entity.node;\n        });\n        _this.setUncontrolledState({\n          checkedKeys: checkedKeys\n        });\n      } else {\n        // Always fill first\n        var _conductCheck = conductCheck([].concat(_toConsumableArray(oriCheckedKeys), [key]), true, keyEntities),\n          _checkedKeys = _conductCheck.checkedKeys,\n          _halfCheckedKeys = _conductCheck.halfCheckedKeys;\n        // If remove, we do it again to correction\n        if (!checked) {\n          var keySet = new Set(_checkedKeys);\n          keySet.delete(key);\n          var _conductCheck2 = conductCheck(Array.from(keySet), {\n            checked: false,\n            halfCheckedKeys: _halfCheckedKeys\n          }, keyEntities);\n          _checkedKeys = _conductCheck2.checkedKeys;\n          _halfCheckedKeys = _conductCheck2.halfCheckedKeys;\n        }\n        checkedObj = _checkedKeys;\n        // [Legacy] This is used for `rc-tree-select`\n        eventObj.checkedNodes = [];\n        eventObj.checkedNodesPositions = [];\n        eventObj.halfCheckedKeys = _halfCheckedKeys;\n        _checkedKeys.forEach(function (checkedKey) {\n          var entity = keyEntities[checkedKey];\n          if (!entity) return;\n          var node = entity.node,\n            pos = entity.pos;\n          eventObj.checkedNodes.push(node);\n          eventObj.checkedNodesPositions.push({\n            node: node,\n            pos: pos\n          });\n        });\n        _this.setUncontrolledState({\n          checkedKeys: _checkedKeys\n        }, false, {\n          halfCheckedKeys: _halfCheckedKeys\n        });\n      }\n      onCheck === null || onCheck === void 0 ? void 0 : onCheck(checkedObj, eventObj);\n    };\n    _this.onNodeLoad = function (treeNode) {\n      var key = treeNode.key;\n      var loadPromise = new Promise(function (resolve, reject) {\n        // We need to get the latest state of loading/loaded keys\n        _this.setState(function (_ref) {\n          var _ref$loadedKeys = _ref.loadedKeys,\n            loadedKeys = _ref$loadedKeys === void 0 ? [] : _ref$loadedKeys,\n            _ref$loadingKeys = _ref.loadingKeys,\n            loadingKeys = _ref$loadingKeys === void 0 ? [] : _ref$loadingKeys;\n          var _this$props7 = _this.props,\n            loadData = _this$props7.loadData,\n            onLoad = _this$props7.onLoad;\n          if (!loadData || loadedKeys.indexOf(key) !== -1 || loadingKeys.indexOf(key) !== -1) {\n            return null;\n          }\n          // Process load data\n          var promise = loadData(treeNode);\n          promise.then(function () {\n            var currentLoadedKeys = _this.state.loadedKeys;\n            var newLoadedKeys = arrAdd(currentLoadedKeys, key);\n            // onLoad should trigger before internal setState to avoid `loadData` trigger twice.\n            // https://github.com/ant-design/ant-design/issues/12464\n            onLoad === null || onLoad === void 0 ? void 0 : onLoad(newLoadedKeys, {\n              event: 'load',\n              node: treeNode\n            });\n            _this.setUncontrolledState({\n              loadedKeys: newLoadedKeys\n            });\n            _this.setState(function (prevState) {\n              return {\n                loadingKeys: arrDel(prevState.loadingKeys, key)\n              };\n            });\n            resolve();\n          }).catch(function (e) {\n            _this.setState(function (prevState) {\n              return {\n                loadingKeys: arrDel(prevState.loadingKeys, key)\n              };\n            });\n            // If exceed max retry times, we give up retry\n            _this.loadingRetryTimes[key] = (_this.loadingRetryTimes[key] || 0) + 1;\n            if (_this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {\n              var currentLoadedKeys = _this.state.loadedKeys;\n              warning(false, 'Retry for `loadData` many times but still failed. No more retry.');\n              _this.setUncontrolledState({\n                loadedKeys: arrAdd(currentLoadedKeys, key)\n              });\n              resolve();\n            }\n            reject(e);\n          });\n          return {\n            loadingKeys: arrAdd(loadingKeys, key)\n          };\n        });\n      });\n      // Not care warning if we ignore this\n      loadPromise.catch(function () {});\n      return loadPromise;\n    };\n    _this.onNodeMouseEnter = function (event, node) {\n      var onMouseEnter = _this.props.onMouseEnter;\n      onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter({\n        event: event,\n        node: node\n      });\n    };\n    _this.onNodeMouseLeave = function (event, node) {\n      var onMouseLeave = _this.props.onMouseLeave;\n      onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave({\n        event: event,\n        node: node\n      });\n    };\n    _this.onNodeContextMenu = function (event, node) {\n      var onRightClick = _this.props.onRightClick;\n      if (onRightClick) {\n        event.preventDefault();\n        onRightClick({\n          event: event,\n          node: node\n        });\n      }\n    };\n    _this.onFocus = function () {\n      var onFocus = _this.props.onFocus;\n      _this.setState({\n        focused: true\n      });\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      onFocus === null || onFocus === void 0 ? void 0 : onFocus.apply(void 0, args);\n    };\n    _this.onBlur = function () {\n      var onBlur = _this.props.onBlur;\n      _this.setState({\n        focused: false\n      });\n      _this.onActiveChange(null);\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n      onBlur === null || onBlur === void 0 ? void 0 : onBlur.apply(void 0, args);\n    };\n    _this.getTreeNodeRequiredProps = function () {\n      var _this$state8 = _this.state,\n        expandedKeys = _this$state8.expandedKeys,\n        selectedKeys = _this$state8.selectedKeys,\n        loadedKeys = _this$state8.loadedKeys,\n        loadingKeys = _this$state8.loadingKeys,\n        checkedKeys = _this$state8.checkedKeys,\n        halfCheckedKeys = _this$state8.halfCheckedKeys,\n        dragOverNodeKey = _this$state8.dragOverNodeKey,\n        dropPosition = _this$state8.dropPosition,\n        keyEntities = _this$state8.keyEntities;\n      return {\n        expandedKeys: expandedKeys || [],\n        selectedKeys: selectedKeys || [],\n        loadedKeys: loadedKeys || [],\n        loadingKeys: loadingKeys || [],\n        checkedKeys: checkedKeys || [],\n        halfCheckedKeys: halfCheckedKeys || [],\n        dragOverNodeKey: dragOverNodeKey,\n        dropPosition: dropPosition,\n        keyEntities: keyEntities\n      };\n    };\n    _this.setExpandedKeys = function (expandedKeys) {\n      var _this$state9 = _this.state,\n        treeData = _this$state9.treeData,\n        fieldNames = _this$state9.fieldNames;\n      var flattenNodes = flattenTreeData(treeData, expandedKeys, fieldNames);\n      _this.setUncontrolledState({\n        expandedKeys: expandedKeys,\n        flattenNodes: flattenNodes\n      }, true);\n    };\n    _this.onNodeExpand = function (e, treeNode) {\n      var expandedKeys = _this.state.expandedKeys;\n      var _this$state10 = _this.state,\n        listChanging = _this$state10.listChanging,\n        fieldNames = _this$state10.fieldNames;\n      var _this$props8 = _this.props,\n        onExpand = _this$props8.onExpand,\n        loadData = _this$props8.loadData;\n      var expanded = treeNode.expanded;\n      var key = treeNode[fieldNames.key];\n      // Do nothing when motion is in progress\n      if (listChanging) {\n        return;\n      }\n      // Update selected keys\n      var index = expandedKeys.indexOf(key);\n      var targetExpanded = !expanded;\n      warning(expanded && index !== -1 || !expanded && index === -1, 'Expand state not sync with index check');\n      if (targetExpanded) {\n        expandedKeys = arrAdd(expandedKeys, key);\n      } else {\n        expandedKeys = arrDel(expandedKeys, key);\n      }\n      _this.setExpandedKeys(expandedKeys);\n      onExpand === null || onExpand === void 0 ? void 0 : onExpand(expandedKeys, {\n        node: treeNode,\n        expanded: targetExpanded,\n        nativeEvent: e.nativeEvent\n      });\n      // Async Load data\n      if (targetExpanded && loadData) {\n        var loadPromise = _this.onNodeLoad(treeNode);\n        if (loadPromise) {\n          loadPromise.then(function () {\n            // [Legacy] Refresh logic\n            var newFlattenTreeData = flattenTreeData(_this.state.treeData, expandedKeys, fieldNames);\n            _this.setUncontrolledState({\n              flattenNodes: newFlattenTreeData\n            });\n          }).catch(function () {\n            var currentExpandedKeys = _this.state.expandedKeys;\n            var expandedKeysToRestore = arrDel(currentExpandedKeys, key);\n            _this.setExpandedKeys(expandedKeysToRestore);\n          });\n        }\n      }\n    };\n    _this.onListChangeStart = function () {\n      _this.setUncontrolledState({\n        listChanging: true\n      });\n    };\n    _this.onListChangeEnd = function () {\n      setTimeout(function () {\n        _this.setUncontrolledState({\n          listChanging: false\n        });\n      });\n    };\n    _this.onActiveChange = function (newActiveKey) {\n      var activeKey = _this.state.activeKey;\n      var onActiveChange = _this.props.onActiveChange;\n      if (activeKey === newActiveKey) {\n        return;\n      }\n      _this.setState({\n        activeKey: newActiveKey\n      });\n      if (newActiveKey !== null) {\n        _this.scrollTo({\n          key: newActiveKey\n        });\n      }\n      onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(newActiveKey);\n    };\n    _this.getActiveItem = function () {\n      var _this$state11 = _this.state,\n        activeKey = _this$state11.activeKey,\n        flattenNodes = _this$state11.flattenNodes;\n      if (activeKey === null) {\n        return null;\n      }\n      return flattenNodes.find(function (_ref2) {\n        var key = _ref2.key;\n        return key === activeKey;\n      }) || null;\n    };\n    _this.offsetActiveKey = function (offset) {\n      var _this$state12 = _this.state,\n        flattenNodes = _this$state12.flattenNodes,\n        activeKey = _this$state12.activeKey;\n      var index = flattenNodes.findIndex(function (_ref3) {\n        var key = _ref3.key;\n        return key === activeKey;\n      });\n      // Align with index\n      if (index === -1 && offset < 0) {\n        index = flattenNodes.length;\n      }\n      index = (index + offset + flattenNodes.length) % flattenNodes.length;\n      var item = flattenNodes[index];\n      if (item) {\n        var key = item.key;\n        _this.onActiveChange(key);\n      } else {\n        _this.onActiveChange(null);\n      }\n    };\n    _this.onKeyDown = function (event) {\n      var _this$state13 = _this.state,\n        activeKey = _this$state13.activeKey,\n        expandedKeys = _this$state13.expandedKeys,\n        checkedKeys = _this$state13.checkedKeys,\n        fieldNames = _this$state13.fieldNames;\n      var _this$props9 = _this.props,\n        onKeyDown = _this$props9.onKeyDown,\n        checkable = _this$props9.checkable,\n        selectable = _this$props9.selectable;\n      // >>>>>>>>>> Direction\n      switch (event.which) {\n        case KeyCode.UP:\n          {\n            _this.offsetActiveKey(-1);\n            event.preventDefault();\n            break;\n          }\n        case KeyCode.DOWN:\n          {\n            _this.offsetActiveKey(1);\n            event.preventDefault();\n            break;\n          }\n      }\n      // >>>>>>>>>> Expand & Selection\n      var activeItem = _this.getActiveItem();\n      if (activeItem && activeItem.data) {\n        var treeNodeRequiredProps = _this.getTreeNodeRequiredProps();\n        var expandable = activeItem.data.isLeaf === false || !!(activeItem.data[fieldNames.children] || []).length;\n        var eventNode = convertNodePropsToEventData(_objectSpread(_objectSpread({}, getTreeNodeProps(activeKey, treeNodeRequiredProps)), {}, {\n          data: activeItem.data,\n          active: true\n        }));\n        switch (event.which) {\n          // >>> Expand\n          case KeyCode.LEFT:\n            {\n              // Collapse if possible\n              if (expandable && expandedKeys.includes(activeKey)) {\n                _this.onNodeExpand({}, eventNode);\n              } else if (activeItem.parent) {\n                _this.onActiveChange(activeItem.parent.key);\n              }\n              event.preventDefault();\n              break;\n            }\n          case KeyCode.RIGHT:\n            {\n              // Expand if possible\n              if (expandable && !expandedKeys.includes(activeKey)) {\n                _this.onNodeExpand({}, eventNode);\n              } else if (activeItem.children && activeItem.children.length) {\n                _this.onActiveChange(activeItem.children[0].key);\n              }\n              event.preventDefault();\n              break;\n            }\n          // Selection\n          case KeyCode.ENTER:\n          case KeyCode.SPACE:\n            {\n              if (checkable && !eventNode.disabled && eventNode.checkable !== false && !eventNode.disableCheckbox) {\n                _this.onNodeCheck({}, eventNode, !checkedKeys.includes(activeKey));\n              } else if (!checkable && selectable && !eventNode.disabled && eventNode.selectable !== false) {\n                _this.onNodeSelect({}, eventNode);\n              }\n              break;\n            }\n        }\n      }\n      onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);\n    };\n    _this.setUncontrolledState = function (state) {\n      var atomic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var forceState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      if (!_this.destroyed) {\n        var needSync = false;\n        var allPassed = true;\n        var newState = {};\n        Object.keys(state).forEach(function (name) {\n          if (name in _this.props) {\n            allPassed = false;\n            return;\n          }\n          needSync = true;\n          newState[name] = state[name];\n        });\n        if (needSync && (!atomic || allPassed)) {\n          _this.setState(_objectSpread(_objectSpread({}, newState), forceState));\n        }\n      }\n    };\n    _this.scrollTo = function (scroll) {\n      _this.listRef.current.scrollTo(scroll);\n    };\n    return _this;\n  }\n  _createClass(Tree, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.destroyed = false;\n      this.onUpdated();\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      this.onUpdated();\n    }\n  }, {\n    key: \"onUpdated\",\n    value: function onUpdated() {\n      var activeKey = this.props.activeKey;\n      if (activeKey !== undefined && activeKey !== this.state.activeKey) {\n        this.setState({\n          activeKey: activeKey\n        });\n        if (activeKey !== null) {\n          this.scrollTo({\n            key: activeKey\n          });\n        }\n      }\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      window.removeEventListener('dragend', this.onWindowDragEnd);\n      this.destroyed = true;\n    }\n  }, {\n    key: \"resetDragState\",\n    value: function resetDragState() {\n      this.setState({\n        dragOverNodeKey: null,\n        dropPosition: null,\n        dropLevelOffset: null,\n        dropTargetKey: null,\n        dropContainerKey: null,\n        dropTargetPos: null,\n        dropAllowed: false\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _classNames;\n      var _this$state14 = this.state,\n        focused = _this$state14.focused,\n        flattenNodes = _this$state14.flattenNodes,\n        keyEntities = _this$state14.keyEntities,\n        draggingNodeKey = _this$state14.draggingNodeKey,\n        activeKey = _this$state14.activeKey,\n        dropLevelOffset = _this$state14.dropLevelOffset,\n        dropContainerKey = _this$state14.dropContainerKey,\n        dropTargetKey = _this$state14.dropTargetKey,\n        dropPosition = _this$state14.dropPosition,\n        dragOverNodeKey = _this$state14.dragOverNodeKey,\n        indent = _this$state14.indent;\n      var _this$props10 = this.props,\n        prefixCls = _this$props10.prefixCls,\n        className = _this$props10.className,\n        style = _this$props10.style,\n        showLine = _this$props10.showLine,\n        focusable = _this$props10.focusable,\n        _this$props10$tabInde = _this$props10.tabIndex,\n        tabIndex = _this$props10$tabInde === void 0 ? 0 : _this$props10$tabInde,\n        selectable = _this$props10.selectable,\n        showIcon = _this$props10.showIcon,\n        icon = _this$props10.icon,\n        switcherIcon = _this$props10.switcherIcon,\n        draggable = _this$props10.draggable,\n        checkable = _this$props10.checkable,\n        checkStrictly = _this$props10.checkStrictly,\n        disabled = _this$props10.disabled,\n        motion = _this$props10.motion,\n        loadData = _this$props10.loadData,\n        filterTreeNode = _this$props10.filterTreeNode,\n        height = _this$props10.height,\n        itemHeight = _this$props10.itemHeight,\n        virtual = _this$props10.virtual,\n        titleRender = _this$props10.titleRender,\n        dropIndicatorRender = _this$props10.dropIndicatorRender,\n        onContextMenu = _this$props10.onContextMenu,\n        onScroll = _this$props10.onScroll,\n        direction = _this$props10.direction,\n        rootClassName = _this$props10.rootClassName,\n        rootStyle = _this$props10.rootStyle;\n      var domProps = pickAttrs(this.props, {\n        aria: true,\n        data: true\n      });\n      // It's better move to hooks but we just simply keep here\n      var draggableConfig;\n      if (draggable) {\n        if (_typeof(draggable) === 'object') {\n          draggableConfig = draggable;\n        } else if (typeof draggable === 'function') {\n          draggableConfig = {\n            nodeDraggable: draggable\n          };\n        } else {\n          draggableConfig = {};\n        }\n      }\n      return /*#__PURE__*/React.createElement(TreeContext.Provider, {\n        value: {\n          prefixCls: prefixCls,\n          selectable: selectable,\n          showIcon: showIcon,\n          icon: icon,\n          switcherIcon: switcherIcon,\n          draggable: draggableConfig,\n          draggingNodeKey: draggingNodeKey,\n          checkable: checkable,\n          checkStrictly: checkStrictly,\n          disabled: disabled,\n          keyEntities: keyEntities,\n          dropLevelOffset: dropLevelOffset,\n          dropContainerKey: dropContainerKey,\n          dropTargetKey: dropTargetKey,\n          dropPosition: dropPosition,\n          dragOverNodeKey: dragOverNodeKey,\n          indent: indent,\n          direction: direction,\n          dropIndicatorRender: dropIndicatorRender,\n          loadData: loadData,\n          filterTreeNode: filterTreeNode,\n          titleRender: titleRender,\n          onNodeClick: this.onNodeClick,\n          onNodeDoubleClick: this.onNodeDoubleClick,\n          onNodeExpand: this.onNodeExpand,\n          onNodeSelect: this.onNodeSelect,\n          onNodeCheck: this.onNodeCheck,\n          onNodeLoad: this.onNodeLoad,\n          onNodeMouseEnter: this.onNodeMouseEnter,\n          onNodeMouseLeave: this.onNodeMouseLeave,\n          onNodeContextMenu: this.onNodeContextMenu,\n          onNodeDragStart: this.onNodeDragStart,\n          onNodeDragEnter: this.onNodeDragEnter,\n          onNodeDragOver: this.onNodeDragOver,\n          onNodeDragLeave: this.onNodeDragLeave,\n          onNodeDragEnd: this.onNodeDragEnd,\n          onNodeDrop: this.onNodeDrop\n        }\n      }, /*#__PURE__*/React.createElement(\"div\", {\n        role: \"tree\",\n        className: classNames(prefixCls, className, rootClassName, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-show-line\"), showLine), _defineProperty(_classNames, \"\".concat(prefixCls, \"-focused\"), focused), _defineProperty(_classNames, \"\".concat(prefixCls, \"-active-focused\"), activeKey !== null), _classNames)),\n        style: rootStyle\n      }, /*#__PURE__*/React.createElement(NodeList, _extends({\n        ref: this.listRef,\n        prefixCls: prefixCls,\n        style: style,\n        data: flattenNodes,\n        disabled: disabled,\n        selectable: selectable,\n        checkable: !!checkable,\n        motion: motion,\n        dragging: draggingNodeKey !== null,\n        height: height,\n        itemHeight: itemHeight,\n        virtual: virtual,\n        focusable: focusable,\n        focused: focused,\n        tabIndex: tabIndex,\n        activeItem: this.getActiveItem(),\n        onFocus: this.onFocus,\n        onBlur: this.onBlur,\n        onKeyDown: this.onKeyDown,\n        onActiveChange: this.onActiveChange,\n        onListChangeStart: this.onListChangeStart,\n        onListChangeEnd: this.onListChangeEnd,\n        onContextMenu: onContextMenu,\n        onScroll: onScroll\n      }, this.getTreeNodeRequiredProps(), domProps))));\n    }\n  }], [{\n    key: \"getDerivedStateFromProps\",\n    value: function getDerivedStateFromProps(props, prevState) {\n      var prevProps = prevState.prevProps;\n      var newState = {\n        prevProps: props\n      };\n      function needSync(name) {\n        return !prevProps && name in props || prevProps && prevProps[name] !== props[name];\n      }\n      // ================== Tree Node ==================\n      var treeData;\n      // fieldNames\n      var fieldNames = prevState.fieldNames;\n      if (needSync('fieldNames')) {\n        fieldNames = fillFieldNames(props.fieldNames);\n        newState.fieldNames = fieldNames;\n      }\n      // Check if `treeData` or `children` changed and save into the state.\n      if (needSync('treeData')) {\n        treeData = props.treeData;\n      } else if (needSync('children')) {\n        warning(false, '`children` of Tree is deprecated. Please use `treeData` instead.');\n        treeData = convertTreeToData(props.children);\n      }\n      // Save flatten nodes info and convert `treeData` into keyEntities\n      if (treeData) {\n        newState.treeData = treeData;\n        var entitiesMap = convertDataToEntities(treeData, {\n          fieldNames: fieldNames\n        });\n        newState.keyEntities = _objectSpread(_defineProperty({}, MOTION_KEY, MotionEntity), entitiesMap.keyEntities);\n        // Warning if treeNode not provide key\n        if (process.env.NODE_ENV !== 'production') {\n          warningWithoutKey(treeData, fieldNames);\n        }\n      }\n      var keyEntities = newState.keyEntities || prevState.keyEntities;\n      // ================ expandedKeys =================\n      if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent')) {\n        newState.expandedKeys = props.autoExpandParent || !prevProps && props.defaultExpandParent ? conductExpandParent(props.expandedKeys, keyEntities) : props.expandedKeys;\n      } else if (!prevProps && props.defaultExpandAll) {\n        var cloneKeyEntities = _objectSpread({}, keyEntities);\n        delete cloneKeyEntities[MOTION_KEY];\n        newState.expandedKeys = Object.keys(cloneKeyEntities).map(function (key) {\n          return cloneKeyEntities[key].key;\n        });\n      } else if (!prevProps && props.defaultExpandedKeys) {\n        newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? conductExpandParent(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys;\n      }\n      if (!newState.expandedKeys) {\n        delete newState.expandedKeys;\n      }\n      // ================ flattenNodes =================\n      if (treeData || newState.expandedKeys) {\n        var flattenNodes = flattenTreeData(treeData || prevState.treeData, newState.expandedKeys || prevState.expandedKeys, fieldNames);\n        newState.flattenNodes = flattenNodes;\n      }\n      // ================ selectedKeys =================\n      if (props.selectable) {\n        if (needSync('selectedKeys')) {\n          newState.selectedKeys = calcSelectedKeys(props.selectedKeys, props);\n        } else if (!prevProps && props.defaultSelectedKeys) {\n          newState.selectedKeys = calcSelectedKeys(props.defaultSelectedKeys, props);\n        }\n      }\n      // ================= checkedKeys =================\n      if (props.checkable) {\n        var checkedKeyEntity;\n        if (needSync('checkedKeys')) {\n          checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {};\n        } else if (!prevProps && props.defaultCheckedKeys) {\n          checkedKeyEntity = parseCheckedKeys(props.defaultCheckedKeys) || {};\n        } else if (treeData) {\n          // If `treeData` changed, we also need check it\n          checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {\n            checkedKeys: prevState.checkedKeys,\n            halfCheckedKeys: prevState.halfCheckedKeys\n          };\n        }\n        if (checkedKeyEntity) {\n          var _checkedKeyEntity = checkedKeyEntity,\n            _checkedKeyEntity$che = _checkedKeyEntity.checkedKeys,\n            checkedKeys = _checkedKeyEntity$che === void 0 ? [] : _checkedKeyEntity$che,\n            _checkedKeyEntity$hal = _checkedKeyEntity.halfCheckedKeys,\n            halfCheckedKeys = _checkedKeyEntity$hal === void 0 ? [] : _checkedKeyEntity$hal;\n          if (!props.checkStrictly) {\n            var conductKeys = conductCheck(checkedKeys, true, keyEntities);\n            checkedKeys = conductKeys.checkedKeys;\n            halfCheckedKeys = conductKeys.halfCheckedKeys;\n          }\n          newState.checkedKeys = checkedKeys;\n          newState.halfCheckedKeys = halfCheckedKeys;\n        }\n      }\n      // ================= loadedKeys ==================\n      if (needSync('loadedKeys')) {\n        newState.loadedKeys = props.loadedKeys;\n      }\n      return newState;\n    }\n  }]);\n  return Tree;\n}(React.Component);\nTree.defaultProps = {\n  prefixCls: 'rc-tree',\n  showLine: false,\n  showIcon: true,\n  selectable: true,\n  multiple: false,\n  checkable: false,\n  disabled: false,\n  checkStrictly: false,\n  draggable: false,\n  defaultExpandParent: true,\n  autoExpandParent: false,\n  defaultExpandAll: false,\n  defaultExpandedKeys: [],\n  defaultCheckedKeys: [],\n  defaultSelectedKeys: [],\n  dropIndicatorRender: DropIndicator,\n  allowDrop: function allowDrop() {\n    return true;\n  },\n  expandAction: false\n};\nTree.TreeNode = TreeNode;\nexport default Tree;","map":{"version":3,"names":["_extends","_defineProperty","_typeof","_objectSpread","_toConsumableArray","_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","React","KeyCode","warning","pickAttrs","classNames","TreeContext","getDragChildrenKeys","parseCheckedKeys","conductExpandParent","calcSelectedKeys","calcDropPosition","arrAdd","arrDel","posToArr","flattenTreeData","convertTreeToData","convertDataToEntities","warningWithoutKey","convertNodePropsToEventData","getTreeNodeProps","fillFieldNames","NodeList","MOTION_KEY","MotionEntity","TreeNode","conductCheck","DropIndicator","MAX_RETRY_TIMES","Tree","_React$Component","_super","_this","_len","arguments","length","_args","Array","_key","call","apply","concat","destroyed","delayedDragEnterLogic","loadingRetryTimes","state","keyEntities","indent","selectedKeys","checkedKeys","halfCheckedKeys","loadedKeys","loadingKeys","expandedKeys","draggingNodeKey","dragChildrenKeys","dropTargetKey","dropPosition","dropContainerKey","dropLevelOffset","dropTargetPos","dropAllowed","dragOverNodeKey","treeData","flattenNodes","focused","activeKey","listChanging","prevProps","fieldNames","dragStartMousePosition","dragNode","currentMouseOverDroppableNodeKey","listRef","createRef","onNodeDragStart","event","node","_this$state","onDragStart","props","eventKey","x","clientX","y","clientY","newExpandedKeys","setState","current","getIndentWidth","setExpandedKeys","window","addEventListener","onWindowDragEnd","onNodeDragEnter","_this$state2","_this$props","onDragEnter","onExpand","allowDrop","direction","_node$props","pos","_assertThisInitialize","resetDragState","_calcDropPosition","indexOf","Object","keys","forEach","key","clearTimeout","persist","setTimeout","entity","children","expanded","nativeEvent","onNodeDragOver","_this$state3","_this$props2","onDragOver","_assertThisInitialize2","_calcDropPosition2","onNodeDragLeave","currentTarget","contains","relatedTarget","onDragLeave","onNodeDragEnd","removeEventListener","onDragEnd","cleanDragState","onNodeDrop","_this$getActiveItem","outsideTree","undefined","_this$state4","onDrop","abstractDropNodeProps","getTreeNodeRequiredProps","active","getActiveItem","data","dropToChild","posArr","dropResult","dragNodesKeys","dropToGap","Number","triggerExpandActionExpand","e","treeNode","_this$state5","isLeaf","shiftKey","metaKey","ctrlKey","filter","nodeItem","eventNode","onNodeExpand","onNodeClick","_this$props3","onClick","expandAction","onNodeDoubleClick","_this$props4","onDoubleClick","onNodeSelect","_this$state6","_this$props5","onSelect","multiple","selected","targetSelected","selectedNodes","map","selectedKey","setUncontrolledState","onNodeCheck","checked","_this$state7","oriCheckedKeys","oriHalfCheckedKeys","_this$props6","checkStrictly","onCheck","checkedObj","eventObj","halfChecked","checkedNodes","checkedKey","_conductCheck","_checkedKeys","_halfCheckedKeys","keySet","Set","delete","_conductCheck2","from","checkedNodesPositions","push","onNodeLoad","loadPromise","Promise","resolve","reject","_ref","_ref$loadedKeys","_ref$loadingKeys","_this$props7","loadData","onLoad","promise","then","currentLoadedKeys","newLoadedKeys","prevState","catch","onNodeMouseEnter","onMouseEnter","onNodeMouseLeave","onMouseLeave","onNodeContextMenu","onRightClick","preventDefault","onFocus","_len2","args","_key2","onBlur","onActiveChange","_len3","_key3","_this$state8","_this$state9","_this$state10","_this$props8","index","targetExpanded","newFlattenTreeData","currentExpandedKeys","expandedKeysToRestore","onListChangeStart","onListChangeEnd","newActiveKey","scrollTo","_this$state11","find","_ref2","offsetActiveKey","offset","_this$state12","findIndex","_ref3","item","onKeyDown","_this$state13","_this$props9","checkable","selectable","which","UP","DOWN","activeItem","treeNodeRequiredProps","expandable","LEFT","includes","parent","RIGHT","ENTER","SPACE","disabled","disableCheckbox","atomic","forceState","needSync","allPassed","newState","name","scroll","value","componentDidMount","onUpdated","componentDidUpdate","componentWillUnmount","render","_classNames","_this$state14","_this$props10","prefixCls","className","style","showLine","focusable","_this$props10$tabInde","tabIndex","showIcon","icon","switcherIcon","draggable","motion","filterTreeNode","height","itemHeight","virtual","titleRender","dropIndicatorRender","onContextMenu","onScroll","rootClassName","rootStyle","domProps","aria","draggableConfig","nodeDraggable","createElement","Provider","role","ref","dragging","getDerivedStateFromProps","entitiesMap","process","env","NODE_ENV","autoExpandParent","defaultExpandParent","defaultExpandAll","cloneKeyEntities","defaultExpandedKeys","defaultSelectedKeys","checkedKeyEntity","defaultCheckedKeys","_checkedKeyEntity","_checkedKeyEntity$che","_checkedKeyEntity$hal","conductKeys","Component","defaultProps"],"sources":["/data/messenger.client/node_modules/rc-tree/es/Tree.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n// TODO: https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/treeview/treeview-2/treeview-2a.html\n// Fully accessibility support\nimport * as React from 'react';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport warning from \"rc-util/es/warning\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport classNames from 'classnames';\nimport { TreeContext } from './contextTypes';\nimport { getDragChildrenKeys, parseCheckedKeys, conductExpandParent, calcSelectedKeys, calcDropPosition, arrAdd, arrDel, posToArr } from './util';\nimport { flattenTreeData, convertTreeToData, convertDataToEntities, warningWithoutKey, convertNodePropsToEventData, getTreeNodeProps, fillFieldNames } from './utils/treeUtil';\nimport NodeList, { MOTION_KEY, MotionEntity } from './NodeList';\nimport TreeNode from './TreeNode';\nimport { conductCheck } from './utils/conductUtil';\nimport DropIndicator from './DropIndicator';\nvar MAX_RETRY_TIMES = 10;\nvar Tree = /*#__PURE__*/function (_React$Component) {\n  _inherits(Tree, _React$Component);\n  var _super = _createSuper(Tree);\n  function Tree() {\n    var _this;\n    _classCallCheck(this, Tree);\n    for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n      _args[_key] = arguments[_key];\n    }\n    _this = _super.call.apply(_super, [this].concat(_args));\n    _this.destroyed = false;\n    _this.delayedDragEnterLogic = void 0;\n    _this.loadingRetryTimes = {};\n    _this.state = {\n      keyEntities: {},\n      indent: null,\n      selectedKeys: [],\n      checkedKeys: [],\n      halfCheckedKeys: [],\n      loadedKeys: [],\n      loadingKeys: [],\n      expandedKeys: [],\n      draggingNodeKey: null,\n      dragChildrenKeys: [],\n      // dropTargetKey is the key of abstract-drop-node\n      // the abstract-drop-node is the real drop node when drag and drop\n      // not the DOM drag over node\n      dropTargetKey: null,\n      dropPosition: null,\n      dropContainerKey: null,\n      dropLevelOffset: null,\n      dropTargetPos: null,\n      dropAllowed: true,\n      // the abstract-drag-over-node\n      // if mouse is on the bottom of top dom node or no the top of the bottom dom node\n      // abstract-drag-over-node is the top node\n      dragOverNodeKey: null,\n      treeData: [],\n      flattenNodes: [],\n      focused: false,\n      activeKey: null,\n      listChanging: false,\n      prevProps: null,\n      fieldNames: fillFieldNames()\n    };\n    _this.dragStartMousePosition = null;\n    _this.dragNode = void 0;\n    _this.currentMouseOverDroppableNodeKey = null;\n    _this.listRef = /*#__PURE__*/React.createRef();\n    _this.onNodeDragStart = function (event, node) {\n      var _this$state = _this.state,\n        expandedKeys = _this$state.expandedKeys,\n        keyEntities = _this$state.keyEntities;\n      var onDragStart = _this.props.onDragStart;\n      var eventKey = node.props.eventKey;\n      _this.dragNode = node;\n      _this.dragStartMousePosition = {\n        x: event.clientX,\n        y: event.clientY\n      };\n      var newExpandedKeys = arrDel(expandedKeys, eventKey);\n      _this.setState({\n        draggingNodeKey: eventKey,\n        dragChildrenKeys: getDragChildrenKeys(eventKey, keyEntities),\n        indent: _this.listRef.current.getIndentWidth()\n      });\n      _this.setExpandedKeys(newExpandedKeys);\n      window.addEventListener('dragend', _this.onWindowDragEnd);\n      onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n    };\n    _this.onNodeDragEnter = function (event, node) {\n      var _this$state2 = _this.state,\n        expandedKeys = _this$state2.expandedKeys,\n        keyEntities = _this$state2.keyEntities,\n        dragChildrenKeys = _this$state2.dragChildrenKeys,\n        flattenNodes = _this$state2.flattenNodes,\n        indent = _this$state2.indent;\n      var _this$props = _this.props,\n        onDragEnter = _this$props.onDragEnter,\n        onExpand = _this$props.onExpand,\n        allowDrop = _this$props.allowDrop,\n        direction = _this$props.direction;\n      var _node$props = node.props,\n        pos = _node$props.pos,\n        eventKey = _node$props.eventKey;\n      var _assertThisInitialize = _assertThisInitialized(_this),\n        dragNode = _assertThisInitialize.dragNode;\n      // record the key of node which is latest entered, used in dragleave event.\n      if (_this.currentMouseOverDroppableNodeKey !== eventKey) {\n        _this.currentMouseOverDroppableNodeKey = eventKey;\n      }\n      if (!dragNode) {\n        _this.resetDragState();\n        return;\n      }\n      var _calcDropPosition = calcDropPosition(event, dragNode, node, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),\n        dropPosition = _calcDropPosition.dropPosition,\n        dropLevelOffset = _calcDropPosition.dropLevelOffset,\n        dropTargetKey = _calcDropPosition.dropTargetKey,\n        dropContainerKey = _calcDropPosition.dropContainerKey,\n        dropTargetPos = _calcDropPosition.dropTargetPos,\n        dropAllowed = _calcDropPosition.dropAllowed,\n        dragOverNodeKey = _calcDropPosition.dragOverNodeKey;\n      if (\n      // don't allow drop inside its children\n      dragChildrenKeys.indexOf(dropTargetKey) !== -1 ||\n      // don't allow drop when drop is not allowed caculated by calcDropPosition\n      !dropAllowed) {\n        _this.resetDragState();\n        return;\n      }\n      // Side effect for delay drag\n      if (!_this.delayedDragEnterLogic) {\n        _this.delayedDragEnterLogic = {};\n      }\n      Object.keys(_this.delayedDragEnterLogic).forEach(function (key) {\n        clearTimeout(_this.delayedDragEnterLogic[key]);\n      });\n      if (dragNode.props.eventKey !== node.props.eventKey) {\n        // hoist expand logic here\n        // since if logic is on the bottom\n        // it will be blocked by abstract dragover node check\n        //   => if you dragenter from top, you mouse will still be consider as in the top node\n        event.persist();\n        _this.delayedDragEnterLogic[pos] = window.setTimeout(function () {\n          if (_this.state.draggingNodeKey === null) return;\n          var newExpandedKeys = _toConsumableArray(expandedKeys);\n          var entity = keyEntities[node.props.eventKey];\n          if (entity && (entity.children || []).length) {\n            newExpandedKeys = arrAdd(expandedKeys, node.props.eventKey);\n          }\n          if (!('expandedKeys' in _this.props)) {\n            _this.setExpandedKeys(newExpandedKeys);\n          }\n          onExpand === null || onExpand === void 0 ? void 0 : onExpand(newExpandedKeys, {\n            node: convertNodePropsToEventData(node.props),\n            expanded: true,\n            nativeEvent: event.nativeEvent\n          });\n        }, 800);\n      }\n      // Skip if drag node is self\n      if (dragNode.props.eventKey === dropTargetKey && dropLevelOffset === 0) {\n        _this.resetDragState();\n        return;\n      }\n      // Update drag over node and drag state\n      _this.setState({\n        dragOverNodeKey: dragOverNodeKey,\n        dropPosition: dropPosition,\n        dropLevelOffset: dropLevelOffset,\n        dropTargetKey: dropTargetKey,\n        dropContainerKey: dropContainerKey,\n        dropTargetPos: dropTargetPos,\n        dropAllowed: dropAllowed\n      });\n      onDragEnter === null || onDragEnter === void 0 ? void 0 : onDragEnter({\n        event: event,\n        node: convertNodePropsToEventData(node.props),\n        expandedKeys: expandedKeys\n      });\n    };\n    _this.onNodeDragOver = function (event, node) {\n      var _this$state3 = _this.state,\n        dragChildrenKeys = _this$state3.dragChildrenKeys,\n        flattenNodes = _this$state3.flattenNodes,\n        keyEntities = _this$state3.keyEntities,\n        expandedKeys = _this$state3.expandedKeys,\n        indent = _this$state3.indent;\n      var _this$props2 = _this.props,\n        onDragOver = _this$props2.onDragOver,\n        allowDrop = _this$props2.allowDrop,\n        direction = _this$props2.direction;\n      var _assertThisInitialize2 = _assertThisInitialized(_this),\n        dragNode = _assertThisInitialize2.dragNode;\n      if (!dragNode) {\n        return;\n      }\n      var _calcDropPosition2 = calcDropPosition(event, dragNode, node, indent, _this.dragStartMousePosition, allowDrop, flattenNodes, keyEntities, expandedKeys, direction),\n        dropPosition = _calcDropPosition2.dropPosition,\n        dropLevelOffset = _calcDropPosition2.dropLevelOffset,\n        dropTargetKey = _calcDropPosition2.dropTargetKey,\n        dropContainerKey = _calcDropPosition2.dropContainerKey,\n        dropAllowed = _calcDropPosition2.dropAllowed,\n        dropTargetPos = _calcDropPosition2.dropTargetPos,\n        dragOverNodeKey = _calcDropPosition2.dragOverNodeKey;\n      if (dragChildrenKeys.indexOf(dropTargetKey) !== -1 || !dropAllowed) {\n        // don't allow drop inside its children\n        // don't allow drop when drop is not allowed caculated by calcDropPosition\n        return;\n      }\n      // Update drag position\n      if (dragNode.props.eventKey === dropTargetKey && dropLevelOffset === 0) {\n        if (!(_this.state.dropPosition === null && _this.state.dropLevelOffset === null && _this.state.dropTargetKey === null && _this.state.dropContainerKey === null && _this.state.dropTargetPos === null && _this.state.dropAllowed === false && _this.state.dragOverNodeKey === null)) {\n          _this.resetDragState();\n        }\n      } else if (!(dropPosition === _this.state.dropPosition && dropLevelOffset === _this.state.dropLevelOffset && dropTargetKey === _this.state.dropTargetKey && dropContainerKey === _this.state.dropContainerKey && dropTargetPos === _this.state.dropTargetPos && dropAllowed === _this.state.dropAllowed && dragOverNodeKey === _this.state.dragOverNodeKey)) {\n        _this.setState({\n          dropPosition: dropPosition,\n          dropLevelOffset: dropLevelOffset,\n          dropTargetKey: dropTargetKey,\n          dropContainerKey: dropContainerKey,\n          dropTargetPos: dropTargetPos,\n          dropAllowed: dropAllowed,\n          dragOverNodeKey: dragOverNodeKey\n        });\n      }\n      onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n    };\n    _this.onNodeDragLeave = function (event, node) {\n      // if it is outside the droppable area\n      // currentMouseOverDroppableNodeKey will be updated in dragenter event when into another droppable receiver.\n      if (_this.currentMouseOverDroppableNodeKey === node.props.eventKey && !event.currentTarget.contains(event.relatedTarget)) {\n        _this.resetDragState();\n        _this.currentMouseOverDroppableNodeKey = null;\n      }\n      var onDragLeave = _this.props.onDragLeave;\n      onDragLeave === null || onDragLeave === void 0 ? void 0 : onDragLeave({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n    };\n    _this.onWindowDragEnd = function (event) {\n      _this.onNodeDragEnd(event, null, true);\n      window.removeEventListener('dragend', _this.onWindowDragEnd);\n    };\n    _this.onNodeDragEnd = function (event, node) {\n      var onDragEnd = _this.props.onDragEnd;\n      _this.setState({\n        dragOverNodeKey: null\n      });\n      _this.cleanDragState();\n      onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd({\n        event: event,\n        node: convertNodePropsToEventData(node.props)\n      });\n      _this.dragNode = null;\n      window.removeEventListener('dragend', _this.onWindowDragEnd);\n    };\n    _this.onNodeDrop = function (event, node) {\n      var _this$getActiveItem;\n      var outsideTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var _this$state4 = _this.state,\n        dragChildrenKeys = _this$state4.dragChildrenKeys,\n        dropPosition = _this$state4.dropPosition,\n        dropTargetKey = _this$state4.dropTargetKey,\n        dropTargetPos = _this$state4.dropTargetPos,\n        dropAllowed = _this$state4.dropAllowed;\n      if (!dropAllowed) return;\n      var onDrop = _this.props.onDrop;\n      _this.setState({\n        dragOverNodeKey: null\n      });\n      _this.cleanDragState();\n      if (dropTargetKey === null) return;\n      var abstractDropNodeProps = _objectSpread(_objectSpread({}, getTreeNodeProps(dropTargetKey, _this.getTreeNodeRequiredProps())), {}, {\n        active: ((_this$getActiveItem = _this.getActiveItem()) === null || _this$getActiveItem === void 0 ? void 0 : _this$getActiveItem.key) === dropTargetKey,\n        data: _this.state.keyEntities[dropTargetKey].node\n      });\n      var dropToChild = dragChildrenKeys.indexOf(dropTargetKey) !== -1;\n      warning(!dropToChild, \"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.\");\n      var posArr = posToArr(dropTargetPos);\n      var dropResult = {\n        event: event,\n        node: convertNodePropsToEventData(abstractDropNodeProps),\n        dragNode: _this.dragNode ? convertNodePropsToEventData(_this.dragNode.props) : null,\n        dragNodesKeys: [_this.dragNode.props.eventKey].concat(dragChildrenKeys),\n        dropToGap: dropPosition !== 0,\n        dropPosition: dropPosition + Number(posArr[posArr.length - 1])\n      };\n      if (!outsideTree) {\n        onDrop === null || onDrop === void 0 ? void 0 : onDrop(dropResult);\n      }\n      _this.dragNode = null;\n    };\n    _this.cleanDragState = function () {\n      var draggingNodeKey = _this.state.draggingNodeKey;\n      if (draggingNodeKey !== null) {\n        _this.setState({\n          draggingNodeKey: null,\n          dropPosition: null,\n          dropContainerKey: null,\n          dropTargetKey: null,\n          dropLevelOffset: null,\n          dropAllowed: true,\n          dragOverNodeKey: null\n        });\n      }\n      _this.dragStartMousePosition = null;\n      _this.currentMouseOverDroppableNodeKey = null;\n    };\n    _this.triggerExpandActionExpand = function (e, treeNode) {\n      var _this$state5 = _this.state,\n        expandedKeys = _this$state5.expandedKeys,\n        flattenNodes = _this$state5.flattenNodes;\n      var expanded = treeNode.expanded,\n        key = treeNode.key,\n        isLeaf = treeNode.isLeaf;\n      if (isLeaf || e.shiftKey || e.metaKey || e.ctrlKey) {\n        return;\n      }\n      var node = flattenNodes.filter(function (nodeItem) {\n        return nodeItem.key === key;\n      })[0];\n      var eventNode = convertNodePropsToEventData(_objectSpread(_objectSpread({}, getTreeNodeProps(key, _this.getTreeNodeRequiredProps())), {}, {\n        data: node.data\n      }));\n      _this.setExpandedKeys(expanded ? arrDel(expandedKeys, key) : arrAdd(expandedKeys, key));\n      _this.onNodeExpand(e, eventNode);\n    };\n    _this.onNodeClick = function (e, treeNode) {\n      var _this$props3 = _this.props,\n        onClick = _this$props3.onClick,\n        expandAction = _this$props3.expandAction;\n      if (expandAction === 'click') {\n        _this.triggerExpandActionExpand(e, treeNode);\n      }\n      onClick === null || onClick === void 0 ? void 0 : onClick(e, treeNode);\n    };\n    _this.onNodeDoubleClick = function (e, treeNode) {\n      var _this$props4 = _this.props,\n        onDoubleClick = _this$props4.onDoubleClick,\n        expandAction = _this$props4.expandAction;\n      if (expandAction === 'doubleClick') {\n        _this.triggerExpandActionExpand(e, treeNode);\n      }\n      onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e, treeNode);\n    };\n    _this.onNodeSelect = function (e, treeNode) {\n      var selectedKeys = _this.state.selectedKeys;\n      var _this$state6 = _this.state,\n        keyEntities = _this$state6.keyEntities,\n        fieldNames = _this$state6.fieldNames;\n      var _this$props5 = _this.props,\n        onSelect = _this$props5.onSelect,\n        multiple = _this$props5.multiple;\n      var selected = treeNode.selected;\n      var key = treeNode[fieldNames.key];\n      var targetSelected = !selected;\n      // Update selected keys\n      if (!targetSelected) {\n        selectedKeys = arrDel(selectedKeys, key);\n      } else if (!multiple) {\n        selectedKeys = [key];\n      } else {\n        selectedKeys = arrAdd(selectedKeys, key);\n      }\n      // [Legacy] Not found related usage in doc or upper libs\n      var selectedNodes = selectedKeys.map(function (selectedKey) {\n        var entity = keyEntities[selectedKey];\n        if (!entity) return null;\n        return entity.node;\n      }).filter(function (node) {\n        return node;\n      });\n      _this.setUncontrolledState({\n        selectedKeys: selectedKeys\n      });\n      onSelect === null || onSelect === void 0 ? void 0 : onSelect(selectedKeys, {\n        event: 'select',\n        selected: targetSelected,\n        node: treeNode,\n        selectedNodes: selectedNodes,\n        nativeEvent: e.nativeEvent\n      });\n    };\n    _this.onNodeCheck = function (e, treeNode, checked) {\n      var _this$state7 = _this.state,\n        keyEntities = _this$state7.keyEntities,\n        oriCheckedKeys = _this$state7.checkedKeys,\n        oriHalfCheckedKeys = _this$state7.halfCheckedKeys;\n      var _this$props6 = _this.props,\n        checkStrictly = _this$props6.checkStrictly,\n        onCheck = _this$props6.onCheck;\n      var key = treeNode.key;\n      // Prepare trigger arguments\n      var checkedObj;\n      var eventObj = {\n        event: 'check',\n        node: treeNode,\n        checked: checked,\n        nativeEvent: e.nativeEvent\n      };\n      if (checkStrictly) {\n        var checkedKeys = checked ? arrAdd(oriCheckedKeys, key) : arrDel(oriCheckedKeys, key);\n        var halfCheckedKeys = arrDel(oriHalfCheckedKeys, key);\n        checkedObj = {\n          checked: checkedKeys,\n          halfChecked: halfCheckedKeys\n        };\n        eventObj.checkedNodes = checkedKeys.map(function (checkedKey) {\n          return keyEntities[checkedKey];\n        }).filter(function (entity) {\n          return entity;\n        }).map(function (entity) {\n          return entity.node;\n        });\n        _this.setUncontrolledState({\n          checkedKeys: checkedKeys\n        });\n      } else {\n        // Always fill first\n        var _conductCheck = conductCheck([].concat(_toConsumableArray(oriCheckedKeys), [key]), true, keyEntities),\n          _checkedKeys = _conductCheck.checkedKeys,\n          _halfCheckedKeys = _conductCheck.halfCheckedKeys;\n        // If remove, we do it again to correction\n        if (!checked) {\n          var keySet = new Set(_checkedKeys);\n          keySet.delete(key);\n          var _conductCheck2 = conductCheck(Array.from(keySet), {\n            checked: false,\n            halfCheckedKeys: _halfCheckedKeys\n          }, keyEntities);\n          _checkedKeys = _conductCheck2.checkedKeys;\n          _halfCheckedKeys = _conductCheck2.halfCheckedKeys;\n        }\n        checkedObj = _checkedKeys;\n        // [Legacy] This is used for `rc-tree-select`\n        eventObj.checkedNodes = [];\n        eventObj.checkedNodesPositions = [];\n        eventObj.halfCheckedKeys = _halfCheckedKeys;\n        _checkedKeys.forEach(function (checkedKey) {\n          var entity = keyEntities[checkedKey];\n          if (!entity) return;\n          var node = entity.node,\n            pos = entity.pos;\n          eventObj.checkedNodes.push(node);\n          eventObj.checkedNodesPositions.push({\n            node: node,\n            pos: pos\n          });\n        });\n        _this.setUncontrolledState({\n          checkedKeys: _checkedKeys\n        }, false, {\n          halfCheckedKeys: _halfCheckedKeys\n        });\n      }\n      onCheck === null || onCheck === void 0 ? void 0 : onCheck(checkedObj, eventObj);\n    };\n    _this.onNodeLoad = function (treeNode) {\n      var key = treeNode.key;\n      var loadPromise = new Promise(function (resolve, reject) {\n        // We need to get the latest state of loading/loaded keys\n        _this.setState(function (_ref) {\n          var _ref$loadedKeys = _ref.loadedKeys,\n            loadedKeys = _ref$loadedKeys === void 0 ? [] : _ref$loadedKeys,\n            _ref$loadingKeys = _ref.loadingKeys,\n            loadingKeys = _ref$loadingKeys === void 0 ? [] : _ref$loadingKeys;\n          var _this$props7 = _this.props,\n            loadData = _this$props7.loadData,\n            onLoad = _this$props7.onLoad;\n          if (!loadData || loadedKeys.indexOf(key) !== -1 || loadingKeys.indexOf(key) !== -1) {\n            return null;\n          }\n          // Process load data\n          var promise = loadData(treeNode);\n          promise.then(function () {\n            var currentLoadedKeys = _this.state.loadedKeys;\n            var newLoadedKeys = arrAdd(currentLoadedKeys, key);\n            // onLoad should trigger before internal setState to avoid `loadData` trigger twice.\n            // https://github.com/ant-design/ant-design/issues/12464\n            onLoad === null || onLoad === void 0 ? void 0 : onLoad(newLoadedKeys, {\n              event: 'load',\n              node: treeNode\n            });\n            _this.setUncontrolledState({\n              loadedKeys: newLoadedKeys\n            });\n            _this.setState(function (prevState) {\n              return {\n                loadingKeys: arrDel(prevState.loadingKeys, key)\n              };\n            });\n            resolve();\n          }).catch(function (e) {\n            _this.setState(function (prevState) {\n              return {\n                loadingKeys: arrDel(prevState.loadingKeys, key)\n              };\n            });\n            // If exceed max retry times, we give up retry\n            _this.loadingRetryTimes[key] = (_this.loadingRetryTimes[key] || 0) + 1;\n            if (_this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {\n              var currentLoadedKeys = _this.state.loadedKeys;\n              warning(false, 'Retry for `loadData` many times but still failed. No more retry.');\n              _this.setUncontrolledState({\n                loadedKeys: arrAdd(currentLoadedKeys, key)\n              });\n              resolve();\n            }\n            reject(e);\n          });\n          return {\n            loadingKeys: arrAdd(loadingKeys, key)\n          };\n        });\n      });\n      // Not care warning if we ignore this\n      loadPromise.catch(function () {});\n      return loadPromise;\n    };\n    _this.onNodeMouseEnter = function (event, node) {\n      var onMouseEnter = _this.props.onMouseEnter;\n      onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter({\n        event: event,\n        node: node\n      });\n    };\n    _this.onNodeMouseLeave = function (event, node) {\n      var onMouseLeave = _this.props.onMouseLeave;\n      onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave({\n        event: event,\n        node: node\n      });\n    };\n    _this.onNodeContextMenu = function (event, node) {\n      var onRightClick = _this.props.onRightClick;\n      if (onRightClick) {\n        event.preventDefault();\n        onRightClick({\n          event: event,\n          node: node\n        });\n      }\n    };\n    _this.onFocus = function () {\n      var onFocus = _this.props.onFocus;\n      _this.setState({\n        focused: true\n      });\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      onFocus === null || onFocus === void 0 ? void 0 : onFocus.apply(void 0, args);\n    };\n    _this.onBlur = function () {\n      var onBlur = _this.props.onBlur;\n      _this.setState({\n        focused: false\n      });\n      _this.onActiveChange(null);\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n      onBlur === null || onBlur === void 0 ? void 0 : onBlur.apply(void 0, args);\n    };\n    _this.getTreeNodeRequiredProps = function () {\n      var _this$state8 = _this.state,\n        expandedKeys = _this$state8.expandedKeys,\n        selectedKeys = _this$state8.selectedKeys,\n        loadedKeys = _this$state8.loadedKeys,\n        loadingKeys = _this$state8.loadingKeys,\n        checkedKeys = _this$state8.checkedKeys,\n        halfCheckedKeys = _this$state8.halfCheckedKeys,\n        dragOverNodeKey = _this$state8.dragOverNodeKey,\n        dropPosition = _this$state8.dropPosition,\n        keyEntities = _this$state8.keyEntities;\n      return {\n        expandedKeys: expandedKeys || [],\n        selectedKeys: selectedKeys || [],\n        loadedKeys: loadedKeys || [],\n        loadingKeys: loadingKeys || [],\n        checkedKeys: checkedKeys || [],\n        halfCheckedKeys: halfCheckedKeys || [],\n        dragOverNodeKey: dragOverNodeKey,\n        dropPosition: dropPosition,\n        keyEntities: keyEntities\n      };\n    };\n    _this.setExpandedKeys = function (expandedKeys) {\n      var _this$state9 = _this.state,\n        treeData = _this$state9.treeData,\n        fieldNames = _this$state9.fieldNames;\n      var flattenNodes = flattenTreeData(treeData, expandedKeys, fieldNames);\n      _this.setUncontrolledState({\n        expandedKeys: expandedKeys,\n        flattenNodes: flattenNodes\n      }, true);\n    };\n    _this.onNodeExpand = function (e, treeNode) {\n      var expandedKeys = _this.state.expandedKeys;\n      var _this$state10 = _this.state,\n        listChanging = _this$state10.listChanging,\n        fieldNames = _this$state10.fieldNames;\n      var _this$props8 = _this.props,\n        onExpand = _this$props8.onExpand,\n        loadData = _this$props8.loadData;\n      var expanded = treeNode.expanded;\n      var key = treeNode[fieldNames.key];\n      // Do nothing when motion is in progress\n      if (listChanging) {\n        return;\n      }\n      // Update selected keys\n      var index = expandedKeys.indexOf(key);\n      var targetExpanded = !expanded;\n      warning(expanded && index !== -1 || !expanded && index === -1, 'Expand state not sync with index check');\n      if (targetExpanded) {\n        expandedKeys = arrAdd(expandedKeys, key);\n      } else {\n        expandedKeys = arrDel(expandedKeys, key);\n      }\n      _this.setExpandedKeys(expandedKeys);\n      onExpand === null || onExpand === void 0 ? void 0 : onExpand(expandedKeys, {\n        node: treeNode,\n        expanded: targetExpanded,\n        nativeEvent: e.nativeEvent\n      });\n      // Async Load data\n      if (targetExpanded && loadData) {\n        var loadPromise = _this.onNodeLoad(treeNode);\n        if (loadPromise) {\n          loadPromise.then(function () {\n            // [Legacy] Refresh logic\n            var newFlattenTreeData = flattenTreeData(_this.state.treeData, expandedKeys, fieldNames);\n            _this.setUncontrolledState({\n              flattenNodes: newFlattenTreeData\n            });\n          }).catch(function () {\n            var currentExpandedKeys = _this.state.expandedKeys;\n            var expandedKeysToRestore = arrDel(currentExpandedKeys, key);\n            _this.setExpandedKeys(expandedKeysToRestore);\n          });\n        }\n      }\n    };\n    _this.onListChangeStart = function () {\n      _this.setUncontrolledState({\n        listChanging: true\n      });\n    };\n    _this.onListChangeEnd = function () {\n      setTimeout(function () {\n        _this.setUncontrolledState({\n          listChanging: false\n        });\n      });\n    };\n    _this.onActiveChange = function (newActiveKey) {\n      var activeKey = _this.state.activeKey;\n      var onActiveChange = _this.props.onActiveChange;\n      if (activeKey === newActiveKey) {\n        return;\n      }\n      _this.setState({\n        activeKey: newActiveKey\n      });\n      if (newActiveKey !== null) {\n        _this.scrollTo({\n          key: newActiveKey\n        });\n      }\n      onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(newActiveKey);\n    };\n    _this.getActiveItem = function () {\n      var _this$state11 = _this.state,\n        activeKey = _this$state11.activeKey,\n        flattenNodes = _this$state11.flattenNodes;\n      if (activeKey === null) {\n        return null;\n      }\n      return flattenNodes.find(function (_ref2) {\n        var key = _ref2.key;\n        return key === activeKey;\n      }) || null;\n    };\n    _this.offsetActiveKey = function (offset) {\n      var _this$state12 = _this.state,\n        flattenNodes = _this$state12.flattenNodes,\n        activeKey = _this$state12.activeKey;\n      var index = flattenNodes.findIndex(function (_ref3) {\n        var key = _ref3.key;\n        return key === activeKey;\n      });\n      // Align with index\n      if (index === -1 && offset < 0) {\n        index = flattenNodes.length;\n      }\n      index = (index + offset + flattenNodes.length) % flattenNodes.length;\n      var item = flattenNodes[index];\n      if (item) {\n        var key = item.key;\n        _this.onActiveChange(key);\n      } else {\n        _this.onActiveChange(null);\n      }\n    };\n    _this.onKeyDown = function (event) {\n      var _this$state13 = _this.state,\n        activeKey = _this$state13.activeKey,\n        expandedKeys = _this$state13.expandedKeys,\n        checkedKeys = _this$state13.checkedKeys,\n        fieldNames = _this$state13.fieldNames;\n      var _this$props9 = _this.props,\n        onKeyDown = _this$props9.onKeyDown,\n        checkable = _this$props9.checkable,\n        selectable = _this$props9.selectable;\n      // >>>>>>>>>> Direction\n      switch (event.which) {\n        case KeyCode.UP:\n          {\n            _this.offsetActiveKey(-1);\n            event.preventDefault();\n            break;\n          }\n        case KeyCode.DOWN:\n          {\n            _this.offsetActiveKey(1);\n            event.preventDefault();\n            break;\n          }\n      }\n      // >>>>>>>>>> Expand & Selection\n      var activeItem = _this.getActiveItem();\n      if (activeItem && activeItem.data) {\n        var treeNodeRequiredProps = _this.getTreeNodeRequiredProps();\n        var expandable = activeItem.data.isLeaf === false || !!(activeItem.data[fieldNames.children] || []).length;\n        var eventNode = convertNodePropsToEventData(_objectSpread(_objectSpread({}, getTreeNodeProps(activeKey, treeNodeRequiredProps)), {}, {\n          data: activeItem.data,\n          active: true\n        }));\n        switch (event.which) {\n          // >>> Expand\n          case KeyCode.LEFT:\n            {\n              // Collapse if possible\n              if (expandable && expandedKeys.includes(activeKey)) {\n                _this.onNodeExpand({}, eventNode);\n              } else if (activeItem.parent) {\n                _this.onActiveChange(activeItem.parent.key);\n              }\n              event.preventDefault();\n              break;\n            }\n          case KeyCode.RIGHT:\n            {\n              // Expand if possible\n              if (expandable && !expandedKeys.includes(activeKey)) {\n                _this.onNodeExpand({}, eventNode);\n              } else if (activeItem.children && activeItem.children.length) {\n                _this.onActiveChange(activeItem.children[0].key);\n              }\n              event.preventDefault();\n              break;\n            }\n          // Selection\n          case KeyCode.ENTER:\n          case KeyCode.SPACE:\n            {\n              if (checkable && !eventNode.disabled && eventNode.checkable !== false && !eventNode.disableCheckbox) {\n                _this.onNodeCheck({}, eventNode, !checkedKeys.includes(activeKey));\n              } else if (!checkable && selectable && !eventNode.disabled && eventNode.selectable !== false) {\n                _this.onNodeSelect({}, eventNode);\n              }\n              break;\n            }\n        }\n      }\n      onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);\n    };\n    _this.setUncontrolledState = function (state) {\n      var atomic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      var forceState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n      if (!_this.destroyed) {\n        var needSync = false;\n        var allPassed = true;\n        var newState = {};\n        Object.keys(state).forEach(function (name) {\n          if (name in _this.props) {\n            allPassed = false;\n            return;\n          }\n          needSync = true;\n          newState[name] = state[name];\n        });\n        if (needSync && (!atomic || allPassed)) {\n          _this.setState(_objectSpread(_objectSpread({}, newState), forceState));\n        }\n      }\n    };\n    _this.scrollTo = function (scroll) {\n      _this.listRef.current.scrollTo(scroll);\n    };\n    return _this;\n  }\n  _createClass(Tree, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      this.destroyed = false;\n      this.onUpdated();\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      this.onUpdated();\n    }\n  }, {\n    key: \"onUpdated\",\n    value: function onUpdated() {\n      var activeKey = this.props.activeKey;\n      if (activeKey !== undefined && activeKey !== this.state.activeKey) {\n        this.setState({\n          activeKey: activeKey\n        });\n        if (activeKey !== null) {\n          this.scrollTo({\n            key: activeKey\n          });\n        }\n      }\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      window.removeEventListener('dragend', this.onWindowDragEnd);\n      this.destroyed = true;\n    }\n  }, {\n    key: \"resetDragState\",\n    value: function resetDragState() {\n      this.setState({\n        dragOverNodeKey: null,\n        dropPosition: null,\n        dropLevelOffset: null,\n        dropTargetKey: null,\n        dropContainerKey: null,\n        dropTargetPos: null,\n        dropAllowed: false\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _classNames;\n      var _this$state14 = this.state,\n        focused = _this$state14.focused,\n        flattenNodes = _this$state14.flattenNodes,\n        keyEntities = _this$state14.keyEntities,\n        draggingNodeKey = _this$state14.draggingNodeKey,\n        activeKey = _this$state14.activeKey,\n        dropLevelOffset = _this$state14.dropLevelOffset,\n        dropContainerKey = _this$state14.dropContainerKey,\n        dropTargetKey = _this$state14.dropTargetKey,\n        dropPosition = _this$state14.dropPosition,\n        dragOverNodeKey = _this$state14.dragOverNodeKey,\n        indent = _this$state14.indent;\n      var _this$props10 = this.props,\n        prefixCls = _this$props10.prefixCls,\n        className = _this$props10.className,\n        style = _this$props10.style,\n        showLine = _this$props10.showLine,\n        focusable = _this$props10.focusable,\n        _this$props10$tabInde = _this$props10.tabIndex,\n        tabIndex = _this$props10$tabInde === void 0 ? 0 : _this$props10$tabInde,\n        selectable = _this$props10.selectable,\n        showIcon = _this$props10.showIcon,\n        icon = _this$props10.icon,\n        switcherIcon = _this$props10.switcherIcon,\n        draggable = _this$props10.draggable,\n        checkable = _this$props10.checkable,\n        checkStrictly = _this$props10.checkStrictly,\n        disabled = _this$props10.disabled,\n        motion = _this$props10.motion,\n        loadData = _this$props10.loadData,\n        filterTreeNode = _this$props10.filterTreeNode,\n        height = _this$props10.height,\n        itemHeight = _this$props10.itemHeight,\n        virtual = _this$props10.virtual,\n        titleRender = _this$props10.titleRender,\n        dropIndicatorRender = _this$props10.dropIndicatorRender,\n        onContextMenu = _this$props10.onContextMenu,\n        onScroll = _this$props10.onScroll,\n        direction = _this$props10.direction,\n        rootClassName = _this$props10.rootClassName,\n        rootStyle = _this$props10.rootStyle;\n      var domProps = pickAttrs(this.props, {\n        aria: true,\n        data: true\n      });\n      // It's better move to hooks but we just simply keep here\n      var draggableConfig;\n      if (draggable) {\n        if (_typeof(draggable) === 'object') {\n          draggableConfig = draggable;\n        } else if (typeof draggable === 'function') {\n          draggableConfig = {\n            nodeDraggable: draggable\n          };\n        } else {\n          draggableConfig = {};\n        }\n      }\n      return /*#__PURE__*/React.createElement(TreeContext.Provider, {\n        value: {\n          prefixCls: prefixCls,\n          selectable: selectable,\n          showIcon: showIcon,\n          icon: icon,\n          switcherIcon: switcherIcon,\n          draggable: draggableConfig,\n          draggingNodeKey: draggingNodeKey,\n          checkable: checkable,\n          checkStrictly: checkStrictly,\n          disabled: disabled,\n          keyEntities: keyEntities,\n          dropLevelOffset: dropLevelOffset,\n          dropContainerKey: dropContainerKey,\n          dropTargetKey: dropTargetKey,\n          dropPosition: dropPosition,\n          dragOverNodeKey: dragOverNodeKey,\n          indent: indent,\n          direction: direction,\n          dropIndicatorRender: dropIndicatorRender,\n          loadData: loadData,\n          filterTreeNode: filterTreeNode,\n          titleRender: titleRender,\n          onNodeClick: this.onNodeClick,\n          onNodeDoubleClick: this.onNodeDoubleClick,\n          onNodeExpand: this.onNodeExpand,\n          onNodeSelect: this.onNodeSelect,\n          onNodeCheck: this.onNodeCheck,\n          onNodeLoad: this.onNodeLoad,\n          onNodeMouseEnter: this.onNodeMouseEnter,\n          onNodeMouseLeave: this.onNodeMouseLeave,\n          onNodeContextMenu: this.onNodeContextMenu,\n          onNodeDragStart: this.onNodeDragStart,\n          onNodeDragEnter: this.onNodeDragEnter,\n          onNodeDragOver: this.onNodeDragOver,\n          onNodeDragLeave: this.onNodeDragLeave,\n          onNodeDragEnd: this.onNodeDragEnd,\n          onNodeDrop: this.onNodeDrop\n        }\n      }, /*#__PURE__*/React.createElement(\"div\", {\n        role: \"tree\",\n        className: classNames(prefixCls, className, rootClassName, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-show-line\"), showLine), _defineProperty(_classNames, \"\".concat(prefixCls, \"-focused\"), focused), _defineProperty(_classNames, \"\".concat(prefixCls, \"-active-focused\"), activeKey !== null), _classNames)),\n        style: rootStyle\n      }, /*#__PURE__*/React.createElement(NodeList, _extends({\n        ref: this.listRef,\n        prefixCls: prefixCls,\n        style: style,\n        data: flattenNodes,\n        disabled: disabled,\n        selectable: selectable,\n        checkable: !!checkable,\n        motion: motion,\n        dragging: draggingNodeKey !== null,\n        height: height,\n        itemHeight: itemHeight,\n        virtual: virtual,\n        focusable: focusable,\n        focused: focused,\n        tabIndex: tabIndex,\n        activeItem: this.getActiveItem(),\n        onFocus: this.onFocus,\n        onBlur: this.onBlur,\n        onKeyDown: this.onKeyDown,\n        onActiveChange: this.onActiveChange,\n        onListChangeStart: this.onListChangeStart,\n        onListChangeEnd: this.onListChangeEnd,\n        onContextMenu: onContextMenu,\n        onScroll: onScroll\n      }, this.getTreeNodeRequiredProps(), domProps))));\n    }\n  }], [{\n    key: \"getDerivedStateFromProps\",\n    value: function getDerivedStateFromProps(props, prevState) {\n      var prevProps = prevState.prevProps;\n      var newState = {\n        prevProps: props\n      };\n      function needSync(name) {\n        return !prevProps && name in props || prevProps && prevProps[name] !== props[name];\n      }\n      // ================== Tree Node ==================\n      var treeData;\n      // fieldNames\n      var fieldNames = prevState.fieldNames;\n      if (needSync('fieldNames')) {\n        fieldNames = fillFieldNames(props.fieldNames);\n        newState.fieldNames = fieldNames;\n      }\n      // Check if `treeData` or `children` changed and save into the state.\n      if (needSync('treeData')) {\n        treeData = props.treeData;\n      } else if (needSync('children')) {\n        warning(false, '`children` of Tree is deprecated. Please use `treeData` instead.');\n        treeData = convertTreeToData(props.children);\n      }\n      // Save flatten nodes info and convert `treeData` into keyEntities\n      if (treeData) {\n        newState.treeData = treeData;\n        var entitiesMap = convertDataToEntities(treeData, {\n          fieldNames: fieldNames\n        });\n        newState.keyEntities = _objectSpread(_defineProperty({}, MOTION_KEY, MotionEntity), entitiesMap.keyEntities);\n        // Warning if treeNode not provide key\n        if (process.env.NODE_ENV !== 'production') {\n          warningWithoutKey(treeData, fieldNames);\n        }\n      }\n      var keyEntities = newState.keyEntities || prevState.keyEntities;\n      // ================ expandedKeys =================\n      if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent')) {\n        newState.expandedKeys = props.autoExpandParent || !prevProps && props.defaultExpandParent ? conductExpandParent(props.expandedKeys, keyEntities) : props.expandedKeys;\n      } else if (!prevProps && props.defaultExpandAll) {\n        var cloneKeyEntities = _objectSpread({}, keyEntities);\n        delete cloneKeyEntities[MOTION_KEY];\n        newState.expandedKeys = Object.keys(cloneKeyEntities).map(function (key) {\n          return cloneKeyEntities[key].key;\n        });\n      } else if (!prevProps && props.defaultExpandedKeys) {\n        newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? conductExpandParent(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys;\n      }\n      if (!newState.expandedKeys) {\n        delete newState.expandedKeys;\n      }\n      // ================ flattenNodes =================\n      if (treeData || newState.expandedKeys) {\n        var flattenNodes = flattenTreeData(treeData || prevState.treeData, newState.expandedKeys || prevState.expandedKeys, fieldNames);\n        newState.flattenNodes = flattenNodes;\n      }\n      // ================ selectedKeys =================\n      if (props.selectable) {\n        if (needSync('selectedKeys')) {\n          newState.selectedKeys = calcSelectedKeys(props.selectedKeys, props);\n        } else if (!prevProps && props.defaultSelectedKeys) {\n          newState.selectedKeys = calcSelectedKeys(props.defaultSelectedKeys, props);\n        }\n      }\n      // ================= checkedKeys =================\n      if (props.checkable) {\n        var checkedKeyEntity;\n        if (needSync('checkedKeys')) {\n          checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {};\n        } else if (!prevProps && props.defaultCheckedKeys) {\n          checkedKeyEntity = parseCheckedKeys(props.defaultCheckedKeys) || {};\n        } else if (treeData) {\n          // If `treeData` changed, we also need check it\n          checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {\n            checkedKeys: prevState.checkedKeys,\n            halfCheckedKeys: prevState.halfCheckedKeys\n          };\n        }\n        if (checkedKeyEntity) {\n          var _checkedKeyEntity = checkedKeyEntity,\n            _checkedKeyEntity$che = _checkedKeyEntity.checkedKeys,\n            checkedKeys = _checkedKeyEntity$che === void 0 ? [] : _checkedKeyEntity$che,\n            _checkedKeyEntity$hal = _checkedKeyEntity.halfCheckedKeys,\n            halfCheckedKeys = _checkedKeyEntity$hal === void 0 ? [] : _checkedKeyEntity$hal;\n          if (!props.checkStrictly) {\n            var conductKeys = conductCheck(checkedKeys, true, keyEntities);\n            checkedKeys = conductKeys.checkedKeys;\n            halfCheckedKeys = conductKeys.halfCheckedKeys;\n          }\n          newState.checkedKeys = checkedKeys;\n          newState.halfCheckedKeys = halfCheckedKeys;\n        }\n      }\n      // ================= loadedKeys ==================\n      if (needSync('loadedKeys')) {\n        newState.loadedKeys = props.loadedKeys;\n      }\n      return newState;\n    }\n  }]);\n  return Tree;\n}(React.Component);\nTree.defaultProps = {\n  prefixCls: 'rc-tree',\n  showLine: false,\n  showIcon: true,\n  selectable: true,\n  multiple: false,\n  checkable: false,\n  disabled: false,\n  checkStrictly: false,\n  draggable: false,\n  defaultExpandParent: true,\n  autoExpandParent: false,\n  defaultExpandAll: false,\n  defaultExpandedKeys: [],\n  defaultCheckedKeys: [],\n  defaultSelectedKeys: [],\n  dropIndicatorRender: DropIndicator,\n  allowDrop: function allowDrop() {\n    return true;\n  },\n  expandAction: false\n};\nTree.TreeNode = TreeNode;\nexport default Tree;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,sBAAsB,MAAM,kDAAkD;AACrF,OAAOC,SAAS,MAAM,qCAAqC;AAC3D,OAAOC,YAAY,MAAM,wCAAwC;AACjE;AACA;AACA,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,SAAS,MAAM,sBAAsB;AAC5C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AACjJ,SAASC,eAAe,EAAEC,iBAAiB,EAAEC,qBAAqB,EAAEC,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